/**
 * @filename:UserLevelServiceImpl 2023-4-20
 * @project Wonder Java前后台分离框架  1.1.0
 * Copyright(c) 2022 Wonder Co. Ltd. 
 * All right reserved. 
 */
package com.wonder.app.service.impl;

import com.wonder.app.domain.UserLevel;
import com.wonder.app.mapper.UserLevelDao;
import com.wonder.app.service.UserLevelService;
import com.wonder.app.request.UserLevelRequest;
import com.wonder.common.utils.StringUtils;
import com.wonder.common.utils.MessageUtils;
import com.wonder.common.common.AjaxResult;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**   
 * @Description:TODO(用户充值级别服务实现)
 *
 * @version: 1.1.0
 * @author: Wonder
 * 
 */
@Service
public class UserLevelServiceImpl  extends ServiceImpl<UserLevelDao, UserLevel> implements UserLevelService  {

    /**
     * 验证用户充值级别信息
     * 
     * @param userLevel
     * @param type
     * @return String
     */
    @Override
    public String validate(UserLevel userLevel,String type){
    
    
       return "";
    }
    
    
    /**
	 * Description:用户充值级别分页返回
	 * @param request //检索条件
	 * @param page //分页参数
	 * @return IPage<UserLevel>   //分页记录
	 */
	@Override 
	public IPage<UserLevel> selectList(UserLevelRequest request, Page<UserLevel> page){
	    LambdaQueryWrapper<UserLevel> lambdaQueryWrapper = new LambdaQueryWrapper<>();
	    
	    if (null != request.getId()) {
	       lambdaQueryWrapper.eq(UserLevel::getId, request.getId());
	      }               
             
        
		lambdaQueryWrapper.orderByDesc(UserLevel::getId);	
		Page<UserLevel> selectPage = this.baseMapper.selectPage(page, lambdaQueryWrapper);
		return selectPage;
    }
        
    
	
}